#include <REGX52.H>
#include "Delay.h"
#include "MatrixLED.h"

unsigned char code Animation[]={   //code是放在FLASH存储中，内存量大，但是编程数组里不能再更改
	0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
	0xFF,0x10,0x10,0x10,0xFF,0x00,0x0E,0x15,
	0x15,0x15,0x09,0x00,0xFF,0x01,0x01,0x01,
	0x01,0x00,0xFF,0x01,0x01,0x01,0x00,0x3C,
	0x42,0x81,0x81,0x81,0x42,0x3C,0x00,0xFD,
	0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00};

void main()
{
	unsigned char i,offset=0,Count=0;
	MatrixLED_Init();
	while(1)
	{
		for(i=0;i<8;i++)
		{
				MatrixLED_ShowColumn(i,Animation[i+offset]); 			
		}
		Count++;
		if(Count>10)
		{
			Count=0;
			offset++;
		}              //起延时作用，消影
		if(offset>40)
		{
			offset=0;
		}
	}
}